package com.java1234.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;

public class BorrowerMainFrm extends JFrame {
	private JPanel contentPane;
	private JDesktopPane table = null;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainFrm frame = new MainFrm();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public BorrowerMainFrm() {
		setBackground(new Color(255, 255, 255));
		setTitle("借书系统主界面");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1402, 703);

		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);

		JMenu mnNewMenu_1 = new JMenu("关于我们");
		menuBar.add(mnNewMenu_1);

		JMenuItem mntmNewMenuItem_1 = new JMenuItem("关于本系统设计");
		mntmNewMenuItem_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Java1234InterFrm java1234InterFrm = new Java1234InterFrm();
				java1234InterFrm.setVisible(true);
				table.add(java1234InterFrm);
			}
		});
		mnNewMenu_1.add(mntmNewMenuItem_1);

		JMenu mnNewMenu_6 = new JMenu("图书借阅");
		menuBar.add(mnNewMenu_6);

		JMenuItem mntmNewMenuItem_8 = new JMenuItem("图书查询");
		mntmNewMenuItem_8.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				BookBorrowManageInterFrm bookBorrowManageInterFrm = new BookBorrowManageInterFrm();
				bookBorrowManageInterFrm.setVisible(true);
				table.add(bookBorrowManageInterFrm);
			}
		});
		mnNewMenu_6.add(mntmNewMenuItem_8);

		JMenuItem mntmNewMenuItem_9 = new JMenuItem("借阅信息");
		mntmNewMenuItem_9.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				BookReturnBorrowerManageInterFrm bookReturnBorrowerManageInterFrm = new BookReturnBorrowerManageInterFrm();
				bookReturnBorrowerManageInterFrm.setVisible(true);
				table.add(bookReturnBorrowerManageInterFrm);
			}
		});
		mnNewMenu_6.add(mntmNewMenuItem_9);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));

		table = new JDesktopPane();
		contentPane.add(table, BorderLayout.CENTER);
		// 设置JFrame最大化
		this.setExtendedState(JFrame.MAXIMIZED_BOTH);

	}
}
